<template>
	<view class="">
		<headerinfo></headerinfo>
		<view class="width60">
			<u-navbar title="纪念厅风格选择" :placeholder="true" leftIconColor="#fff" :autoBack="true" :bgColor="bgColor"
				:titleStyle="titleStyle"></u-navbar>
			
			<view class="guanlist">
				<view class="list" @click="check(item)" v-for="(item,index) in list" :key="index">
					<image :src="item.styleImageUrl" mode="widthFix"></image>
					<span>{{item.styleName}}</span>
					<view class="btn">
						选择
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				bgColor: '#de4849',
				titleStyle: {
					color: '#fff'
				},
				list: []
			};
		},
		onLoad(e) {
			this.getData()
		},
		methods: {
			getData() {
				this.$api.hallStylequeryAvailableHallStyle().then(res => {
					console.log(res)
					this.list = res
				})
			},
			check(item) {
				uni.$emit('checkdating', item)
				uni.navigateBack({
					delta: 1
				})
			}
		}
	};
</script>


<style lang="scss" scoped>
	.guanlist {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		padding: 20rpx;

		.list {
			width: 48%;
			padding: 20rpx;
			background-color: #fff;
			border-radius: 20rpx;
			margin-bottom: 20rpx;
			font-size: 26rpx;

			image {
				width: 100%;
				height: auto;

			}

			.btn {
				width: 120rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				background-image: linear-gradient(135deg, #FEB692 10%, #EA5455 100%);
				color: #fff;
				padding: 10rpx 0;
				border-radius: 10rpx;
				font-size: 26rpx;
				margin: 20rpx auto;
				margin-bottom: 0;
			}
		}
	}

	

	.create {
		width: 600rpx;
		height: 80rpx;
		background: #de4849;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 30rpx auto;
		border-radius: 20rpx;
	}
	
	
	
	.searchPage {
		width: 540px;
		background-size: 100%;
		background-color: #fff;
		margin: 0 auto;
		box-shadow: 0 0 3px #ccc;
	}
	
	
	::v-deep .u-tabbar--fixed{
		width: 540px;
		left: 50%;
		transform: translateX(-50%);
		background-color: #f2f2f2;
	}
	
	::v-deep .u-navbar--fixed{
		width: 540px;
		left: 50%;
		transform: translateX(-50%);
	}
</style>